#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time    : 2018/1/26 0026 16:37
# @Author  : Arliki
# @email   : hkdnxycz@outlook.com
# @File    : for_mongo
import pymongo

con = pymongo.MongoClient()
pdb = con.python
p_test = pdb.test


def run():
    like = {'name': '张三', 'age': 19}
    lisi = {'name': '李四', 'age': 90}
    p_test.insert(like)
    p_test.insert(lisi)
    p_test.remove({'age': {'$gt': 30}})
    print("over")


if __name__ == '__main__':
    run()
